package com.puyuba.puyuba.utils.custommessage;

import android.content.Context;
import android.widget.TextView;

import com.hyphenate.chat.EMCustomMessageBody;
import com.hyphenate.easeui.widget.chatrow.EaseChatRow;
import com.puyuba.puyuba.R;
import com.puyuba.puyuba.network.Constants;

import java.util.Map;

public class SystemTxtNew extends EaseChatRow {
    private TextView hint;

    public SystemTxtNew(Context context, boolean isSender) {
        super(context, isSender);
    }

    @Override
    protected void onInflateView() {
        inflater.inflate(isSender ? R.layout.ease_system_sent_txt : R.layout.ease_system_received_txt, this);
    }

    @Override
    protected void onFindViewById() {
        hint = (TextView) findViewById(R.id.tv_sys_text);

    }

    @Override
    protected void onSetUpView() {
        EMCustomMessageBody txtBody = (EMCustomMessageBody) message.getBody();
        Map<String,String> params = txtBody.getParams();
        String str = params.get(Constants.SYSTEM_HINT);
        hint.setText(str);
    }





}
